from django.conf.urls import url
from . import views
from rest_framework_jwt.views import obtain_jwt_token

urlpatterns = [
    #/users/usernames/(?P<username>\w{5,20})/count/
    url(r'^usernames/(?P<username>\w{5,20})/count/$',views.RegisterUsernameCountView.as_view(),name='usernamecount'),

    url(r'^$',views.RegisterCreateUserView.as_view()),
    # /users/auths/
    url(r'auths/', obtain_jwt_token, name='auths'),

    url(r'^infos/$',views.UserCenterView.as_view()),
    #保存邮箱的端口
    url(r'^emails/$', views.UserEmailView.as_view()),
    #绑定成功
    url(r'^emails/verification/$',views.UserActiveEmailView.as_view()),

    #新增地址
    url(r'^addresses/$', views.AddressCreateAPIView.as_view()),
]

